#include <iostream>
#include "vectorfunctions.h"

int _2to10(int x[], int l)
{	
	int i=0, n=0;
	mirror(x, l);
	while (i<l){
		n+=x[i]*power(2, i);
		++i;
	}
return n;			
}

int main()
{
	int l, n;
	int x[100];
	cout<<"Length of array : ";
	cin>>l;
	readVector(x, l);
	printVector(x, l);
	n = _2to10(x, l);
	cout<<n<<"\n";
	
return 0;
}
